var config = iClass.config;
iClass.method("Tag", {
	setInfo: function(info) {
		info.title = String(info.title || "")
		info.description = String(info.description || "");

		if (!info.title) {
			Throw("标签名不可为空");
		}
		if (info.title.length >= config.tagTitleMaxLength) {
			Throw("标签名过长");
		}
		this.title = info.title;
		this.description = info.description;
		//如果为空，说明是公共标签
		this.user_id = info.user_id;
		this.save();
	}
});